<template>
<!--公司概要 => 财务指标组件-->
<div class="financial_index">
	<div class="title">{{ $lang('FINANCIAL_INDEX') }}</div>
	<div class="table_box">
		<el-table
		    :data="IndicatorsData.data"
		    border
            :empty-text="$lang('NODATA')"
		    style="width: 100%;border:10px;background-color: #212C4F;"
		  	:row-style="{
		  		'background-color':'#1A233E',
		  	}"		
		  	>
		    <el-table-column
		      prop="reportDate"
		      :label="$lang('REPORTING_PERIOD')"
		      >
		    </el-table-column>
		    <el-table-column
		      prop="earningsPerCurrency"
		      :label="$lang('EARNINGS_PER_CURRENCY_YUAN')"
		      >
		    </el-table-column>
		    <el-table-column
		      prop="netAsset"
		      :label="$lang('NET_ASSETS_YUAN')"
		      >
		    </el-table-column>
		    <el-table-column
		      prop="netCapitalReservePerCurrency"
		      :label="$lang('NET_CAPITAL_RESERVE_PER_CURRRENCY')"
		      >
		    </el-table-column>
		    <el-table-column
		      prop="undistributedProfitPerCurrency"
		      :label="$lang('UNDISTRIBUTED_PROFIT_PER_CURRENCY')"
		      >
		    </el-table-column>
		    <el-table-column
		      prop="cashFlowPerCurrency"
		      :label="$lang('CASH_FLOW_PER_CURRENCY')"
		      >
		    </el-table-column>
		    <el-table-column
		      prop="profitIncome"
		      :label="$lang('PROFIT_INCOME_YUAN')"
		      >
		    </el-table-column>
		    <el-table-column
		      prop="netProfits"
		      :label="$lang('NET_PROFIT_YUAN')"
		      >
		    </el-table-column>
		    <el-table-column
		      prop="roe"
		      :label="$lang('RETURN_ON_ASSETS')">
		    </el-table-column>
		    <el-table-column
		      prop="changeReason"
		      :label="$lang('CAUSE_OF_CHANGE')">
		    </el-table-column>
		</el-table>
	</div>
	<div class="page">
	 	<el-pagination v-if="IndicatorsData.totalCount !== 0"
	    layout="prev, pager, next"
        @current-change="getIndicators"
	    :total="IndicatorsData.totalPage * 10">
	  </el-pagination>
	</div>
	 
</div>
</template>

<script>
import { gets } from "@/api/api.js";
export default {
	data() {
		return {
			input :"",
            sortName: "升序",
            IndicatorsData: []
        }
	},
    methods:{
        async getIndicators(type) {
            let that = this
            try {
                // 财务指标
                let res = await gets.searchCompanyList("/indicators/find-page.json", {
                    companyId : that.$store.state.common.companyId,
                    pageNo: type,
                    pageSize: 6
                });
                that.IndicatorsData = res.data
            } catch (e) {
                console.log(e)
                throw e;
            }
        }
    },
    created() {
        this.getIndicators(1)
    }
}
</script>

<style>
</style>